package d10_extends_constructor;

class F{
    public F(){
        System.out.println("父类F的无参构造器执行了");
    }
}

class Z extends F{
    public Z(){
        //super();默认有
        System.out.println("子类Z的无参构造器执行了");
    }

    public Z(String name){
        //super();默认有
        System.out.println("子类Z的有参构造器执行了");
    }
}

public class Test {
    public static void main(String[] args) {
        Z z = new Z();
        Z z1 = new Z("波妞");
    }
}
